
+function(app) {

	// 找回密码
	$(function() {
		var form = $("form[name=repwd]");
		if (form.length == 0) { return; }

		var inputs = form.find("input[type=text],input[type=password]");

		var submit = function(e) {
			e.preventDefault();
			form.find(".do-submit").zajax(form, {login:true, rememberMe:true}, function(json) {
				var account = form.find("input[name=account]").val();
				window.Cookies && Cookies.set("AUTH_ACCOUNT", account, { path:app.getCookiePath() });
				window.history.back();
			});
		};

		// 绑定事件-提交
		form.find(".do-submit").click(submit);

		// 回车键移到下一输入框, 最后一个回车提交
		Utils.enterToNext(inputs, submit);

		// 绑定事件-发送短信验证码
		form.find(".do-send").click(app.doSendSmsCode);

		if (window.Cookies) {
			var account = Cookies.get("TEMP_ACCOUNT");
			account && form.find("input[name=account]").val(account);
		}
	});

}(window.app);

